import 'package:json_annotation/json_annotation.dart';


import 'axis.dart';
import 'axis_pointer.dart';
import 'text_style.dart';
import 'tooltip.dart';


part 'single_axis.g.dart';

@JsonSerializable(includeIfNull: false, explicitToJson: true)
class SingleAxis {
  var id;
  var zlvel;
  var z;
  var left;
  var top;
  var right;
  var bottom;
  var width;
  var height;
  var orient;

  var type;
  var name;
  var nameLocation;

  TextStyle? nameTextStyle;
  var nameGap;
  var nameRotate;
  var inverse;
  var boundaryGap; //be set to either true or false or ['20%', '20%']
  var min; //number var Function
  var max; //number var Function
  var scale;
  var splitNumber;
  var minInterval;
  var maxInterval;
  var interval;
  var logBase;
  var silent;
  var triggerEvent;
  AxisLine? axisLine;
  AxisTick? axisTick;
  MinorTick? minorTick;
  AxisLabel? axisLabel;
  SplitLine? splitLine;
  MinorSplitLine? minorSplitLine;

  SplitArea? splitArea;
  List<AxisData>? data;
  AxisPointer? axisPointer;
  Tooltip? tooltip;

  SingleAxis(
      {this.id,
      this.zlvel,
      this.z,
      this.left,
      this.top,
      this.right,
      this.bottom,
      this.width,
      this.height,
      this.orient,
      this.type,
      this.name,
      this.nameLocation,
      this.nameTextStyle,
      this.nameGap,
      this.nameRotate,
      this.inverse,
      this.boundaryGap,
      this.min,
      this.max,
      this.scale,
      this.splitNumber,
      this.minInterval,
      this.maxInterval,
      this.interval,
      this.logBase,
      this.silent,
      this.triggerEvent,
      this.axisLine,
      this.axisTick,
      this.minorTick,
      this.axisLabel,
      this.splitLine,
      this.minorSplitLine,
      this.splitArea,
      this.data,
      this.axisPointer,
      this.tooltip});


  factory SingleAxis.fromJson(Map<String, dynamic> json) => _$SingleAxisFromJson(json);

  Map<String, dynamic> toJson() => _$SingleAxisToJson(this);
}
